package com.briup.pts.web.controller;

import com.briup.pts.config.response.Result;
import com.briup.pts.domain.bean.Batch;
import com.briup.pts.domain.vo.HurdlesVO;
import com.briup.pts.service.BatchService;
import com.briup.pts.service.HurdlesService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@Tag(name = "补充模块")
@RequiredArgsConstructor
@RestController
public class ExtraController {
    private final BatchService batchService;
    private final HurdlesService hurdlesService;

    @Operation(summary = "查询所有批次信息下拉列表")
    @GetMapping("/batch/queryAll")
    public Result<?> queryAll(){
        List<Batch> list = batchService.queryAll();
        return Result.success(list).apply("获取成功");
    }
    @Operation(summary = "查询所有栏圈信息下拉列表")
    @GetMapping("/hurdles/selectAllHurdles")
    public Result<?> selectAllHurdles(){
        List<HurdlesVO> list = hurdlesService.queryAll();
        return Result.success(list)
                .apply("获取成功");
    }
}
